﻿using CNKI.TPI.Web.Search.Model;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CNKI.TPI.Web.Admin.IBLL
{
    /// <summary>
    /// 
    /// </summary>
    public interface ISubmitAdminService
    {
        /// <summary>
        /// 保存SYS_CMS_OPTION表的数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        bool SaveOption(IList<SYS_CMS_OPTION> list);
        /// <summary>
        /// 删除_MetaData相关数据
        /// </summary>
        /// <param name="dbcode"></param>
        /// <param name="sysid"></param>
        /// <returns></returns>
        bool DelMetaData(string dbcode, int sysid);
        /// <summary>
        /// 获取不合格因素
        /// </summary>
        /// <returns></returns>
        IList<SYS_CMS_ERRORINFOCONFIG> GetErrorInfo();
        /// <summary>
        /// 更新MetaData数据信息
        /// </summary>
        /// <param name="dbcode"></param>
        /// <param name="markstate"></param>
        /// <param name="errorinfo"></param>
        /// <param name="sysid"></param>
        /// <returns></returns>
        bool UpdateMetaData(string dbcode, string markstate, string errorinfo, string sysid);
        /// <summary>
        /// 保存SYS_CMS_ERRORINFOCONFIG表的数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        bool SaveErrorList(IList<SYS_CMS_ERRORINFOCONFIG> list);
        /// <summary>
        /// 获取数字对象使用字段
        /// </summary>
        /// <param name="dbcode"></param>
        /// <returns></returns>
        IList<SYS_CMS_DATABASE_FIELD> GetNumField(string dbcode);
        /// <summary>
        /// 更新SYS_CMS_DATABASE表的 papertype  PaperFieldValue DatetimeFlag 字段
        /// </summary>
        /// <param name="papertype"></param>
        /// <param name="field"></param>
        /// <param name="timecheck"></param>
        /// <param name="sysid"></param>
        /// <returns></returns>
        bool UpdateCmsDataBase(string papertype, string field, string timecheck, string sysid);
        /// <summary>
        /// 获取设置过提交样式的字段
        /// </summary>
        /// <param name="dbcode"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        IList<SYS_CMS_SUBMIT> IsEditStyle(string dbcode, string type);
        /// <summary>
        /// 构造 下拉样式列表
        /// </summary>
        /// <returns></returns>
        IList<SubmitFieldType> GetSelectStyle();
        /// <summary>
        /// 保存SYS_CMS_SUBMIT表的数据
        /// </summary>
        /// <param name="list"></param>
        /// <returns></returns>
        bool SaveStyle(IList<SYS_CMS_SUBMIT> list);
        /// <summary>
        /// 获取SYS_CMS_USER表字段
        /// </summary>
        /// <returns></returns>
        List<string> GetUserColumnName();
        /// <summary>
        /// 删除提交样式
        /// </summary>
        /// <param name="dbcode"></param>
        /// <param name="type"></param>
        /// <returns></returns>
        bool DelStyle(string dbcode, string type);

    }
}
